using System;
using System.Collections.Generic;
using System.Text;

using ClassBuilderWizard.Interfaces;

namespace ClassBuilderWizard.DefaultPlugins
{
    public class ManualPlugin : IManualPlugin, IDisposable
    {
        private ProjectType[] _SupportedProjectTypes;

        public ManualPlugin()
        {
            this._SupportedProjectTypes = new ProjectType[] { ProjectType.CSharp, ProjectType.VB };
        }

        #region IManualPlugin Members

        public ManualObject ExecutePlugin(Parameters parameters)
        {
            //the object to return to the caller
            ManualObject result = new ManualObject(parameters.CurrentProjectType);

            //start the first form to collect the info from the user
            Forms.frmManualWizardStep1 frm1 = new Forms.frmManualWizardStep1(parameters.CurrentProjectType);
            if (frm1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //the user wants to proceed
                result.Properties = frm1.GetProperties();
            }

            return result;
        }

        #endregion

        #region IPlugin Members

        public string Name
        {
            get { return "Manual Class Creator"; }
        }

        public string Version
        {
            get { return "3.0"; }
        }

        public string Author
        {
            get { return "Jason Williams"; }
        }

        public ProjectType[] SupportedProjectTypes
        {
            get { return this._SupportedProjectTypes; }
        }

        public System.Drawing.Bitmap Icon
        {
            get { return Images.classImg; }
        }

        public PluginType PluginType
        {
            get { return PluginType.Manual; }
        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            this._SupportedProjectTypes = null;
        }

        #endregion
    }
}
